MODULES_DIR := /lib/modules/$(shell uname -r)
KERNEL_DIR := ${MODULES_DIR}/build

all:
	make -C ${KERNEL_DIR} M=$$PWD;
modules:
	make -C ${KERNEL_DIR} M=$$PWD $@;
modules_install:
	make -C ${KERNEL_DIR} M=$$PWD $@;
install: modules_install
	depmod
clean:
	make -C ${KERNEL_DIR} M=$$PWD $@;

insert:
	sudo insmod graybox.ko
	dmesg | tail -15
remove:
	sudo rmmod graybox
	sudo dmesg -c
